//
//  XJ_Utils.h
//  XunJieProject
//
//  Created by 薛子 on 2018/6/7.
//  Copyright © 2018年 Soowin. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface XJ_Utils : NSObject
+ (void)POSTZDX:(NSString *)url parameters:(NSDictionary *)params success:(void (^)(id))success failure:(void (^)(NSError *))failure;
/**
 Post请求
 */
+(BOOL)post:(NSString *)urlStr parameters:(NSDictionary *)parameters success:(void (^)(NSInteger recode, id jsonObject))success failure:(void (^)(NSInteger recode, NSError *error))failure;

+(BOOL)signPost:(NSString *)urlStr  parameters:(NSDictionary *)parameters success:( void(^)(NSInteger recode, id jsonObject) ) success failure:( void(^)(NSInteger recode, NSError *error) ) failure;

+(BOOL)imagePost:(NSString *)urlStr  parameters:(NSDictionary *)parameters image:(UIImage *)image success:( void(^)(NSInteger recode, id jsonObject) ) success failure:( void(^)(NSInteger recode, NSError *error) ) failure;


/**
 Get请求
 */
+(BOOL)get:(NSString *)urlStr parameters:(NSDictionary *)parameters success:(void (^)(NSInteger recode, id jsonObject))success failure:(void (^)(NSInteger recode, NSError *error))failure;
+ (void)alertViewWithMessage:(NSString *)message;

+ (NSString *)getTimeFromTimestamp:(NSString *)timeStampString;

+(void)showHUD;

+(void)hideHUD;

+(CGSize )labelSizeWithStr:(NSString *)str andHeight:(CGFloat)height andFont:(CGFloat)font;

+(CGSize )labelSizeWithStr:(NSString *)str andWight:(CGFloat)wight andFont:(CGFloat)font;

+ (NSString *)getStringByDate:(NSDate *)date;
//比较两个日期大小
+(int)compareOneDay:(NSString *)oneDay withAnotherDay:(NSString *)anotherDay;
//sign字符串
+ (NSString *)urlWithSignValue:(NSDictionary*)dict;
@end
